Engineers use compression (also called source coding or source encoding) to reduce the bit rate of digital video. Compression decreases the cost of storing and transmitting video information by converting the information into a lower bit rate form. Decompression (also called decoding) reconstructs a version of the original information from the compressed form. A “codec” is an encoder/decoder system.
Over the last 25 years, various video codec standards have been adopted, including the ITU-T H.261, H.262 (MPEG-2 or ISO/IEC 13818-2), H.263 and H.264 (MPEG-4 AVC or ISO/IEC 14496-10) standards, the MPEG-1 (ISO/IEC 11172-2) and MPEG-4 Visual (ISO/IEC 14496-2) standards, and the SMPTE 421M (VC-1) standard. More recently, the H.265/HEVC standard (ITU-T H.265 or ISO/IEC 23008-2) has been approved. Extensions to the H.265/HEVC standard (e.g., for scalable video coding/decoding, for coding/decoding of video with higher fidelity in terms of sample bit depth or chroma sampling rate, for screen capture content, or for multi-view coding/decoding) are currently under development. A video codec standard typically defines options for the syntax of an encoded video bitstream, detailing parameters in the bitstream when particular features are used in encoding and decoding. In many cases, a video codec standard also provides details about the decoding operations a decoder should perform to achieve conforming results in decoding. Aside from codec standards, various proprietary codec formats define other options for the syntax of an encoded video bitstream and corresponding decoding operations.
A video source such as a camera or screen capture module typically provides video that is converted to a format such as a YUV 4:4:4 chroma sampling format. A YUV format includes a luma (or Y) component with sample values representing approximate brightness values as well as multiple chroma (or U and V) components with sample values representing color difference values. In a YUV 4:4:4 format, chroma information is represented at the same spatial resolution as luma information. Many commercially available video encoders and decoders support a YUV 4:2:0 chroma sampling format or YUV 4:2:2 chroma sampling format. A YUV 4:2:0 format is a format that sub-samples chroma information compared to a YUV 4:4:4 format, so that chroma resolution is half that of luma resolution both horizontally and vertically. As a design principle, the decision to use a YUV 4:2:0 format for encoding/decoding is premised on the understanding that, for typical use cases such as encoding/decoding of natural, camera-captured video content, viewers do not ordinarily notice significant visual differences between video encoded/decoded in a YUV 4:2:0 format and video encoded/decoded in a YUV 4:4:4 format. The compression advantages for the YUV 4:2:0 format, which has fewer samples per picture, are therefore compelling. A YUV 4:2:2 format is a format that sub-samples chroma information compared to a YUV 4:4:4 format, so that chroma resolution is half that of luma resolution horizontally.
Intra block copy (“BC”) is a prediction mode under development for H.265/HEVC extensions. For intra BC prediction mode, the sample values of a current block of a picture are predicted using previously reconstructed sample values in the same picture. A block vector (“BV”) value indicates a displacement from the current block to a reference block of the picture that includes the previously reconstructed sample values used for prediction. The BV value is signaled in the bitstream. In some designs, a block of luma sample values (“luma block”) can be a 4×4 block, 4×8 block, 8×4 block, 8×8 block, or block having a larger size. If the chroma sampling format is 4:2:0 or 4:2:2, a corresponding block of chroma sample values (“chroma block”) can be a 2×2 block, 2×4 block, 2×8 block, 4×2 block, 4×4 block, or block having a larger size. When the minimum block size for intra BC prediction is 4×4, some chroma blocks (e.g., 2×2, 2×4, 2×8, or 4×2 blocks) may be smaller than the minimum block size. The small chroma blocks are merged into a single block for purposes of intra BC prediction with a single BV value. The single BV value for the merged chroma blocks is derived by selecting the BV value of the bottom-most, right-most block among the corresponding luma blocks for the merged chroma blocks. In some cases, the BV value derived by this rule references sample values outside the picture, which are unavailable for intra BC prediction. Although such cases may be rare, they can cause encoding or decoding to fail unexpectedly.